import React from 'react';
import { Table, Button } from 'antd';
import './AbsentTable.css';



function AbsentTable(props) {
    const { children, columns, data, rowKey} = props
    const itemRender = (page, type, originalElement) => {
        if (type === 'prev') {
            return <a >上一页</a>
        } else if (type === 'next') {

            return <a>下一页</a>
        }
        return originalElement
    }
    return (
        <>
            <div className='table_layout'>
                <div>
                    {children}
                </div>
                <Table columns={columns} dataSource={data} rowKey={rowKey} bordered
                    pagination={{
                        showQuickJumper: { goButton: <Button style={{ marginLeft: '5px' }}>确定</Button> },
                        locale: { jump_to: "跳转至", page: '页 ' },
                        itemRender
                    }}
                />
            </div>
        </>
    );
}

export default AbsentTable;